if ZhanDouKaPaiGameMode == nil then
	ZhanDouKaPaiGameMode = class({})
end

function Precache( context )

end

function Activate()
	GameRules.AddonTemplate = ZhanDouKaPaiGameMode()
	GameRules.AddonTemplate:InitGameMode()
end

function ZhanDouKaPaiGameMode:InitGameMode()
	print( "Template addon is loaded." )
	GameRules:GetGameModeEntity():SetThink( "OnThink", self, "GlobalThink", 2 )
end

function ZhanDouKaPaiGameMode:OnThink()
	if GameRules:State_Get() == DOTA_GAMERULES_STATE_GAME_IN_PROGRESS then
	elseif GameRules:State_Get() >= DOTA_GAMERULES_STATE_POST_GAME then
		return nil
	end
	return 1
end